package com.itheima.dubbo.interfaces;

import com.itheima.commons.model.mongo.Message;
import org.bson.types.ObjectId;

import java.util.List;

/**
 * @Auther: alongchan
 * @Date: 2021/12/19 14:36
 * @Description:
 */


public interface ManageApi {

    List<Message> getAllMessagesByState(Integer page, Integer pageSize, Long userId, String state, String sortProp, String sortOrder,Long startTime,Long endTime);

    //查询message中总记录数
    Integer findTotalCount(Long userId,Long startTime,Long endTime);

    //查询待审核的数量
    Integer findWaitCheckCount(Long userId,Long startTime,Long endTime);

    //查询已通过的数量
    Integer findPassCount(Long userId,Long startTime,Long endTime);

    //查询已拒绝的数量
    Integer findRejectCount(Long userId,Long startTime,Long endTime);

    List<Message> getAll(Integer page, Integer pageSize, Long userId, String state, String sortProp, String sortOrder,Long startTime,Long endTime);

    Boolean passMessage(String id);

    Boolean rejectMessage(String id);

    //查询message状态
    String findMessageStateByPublishId(ObjectId id);

    //审核后的message存入message表
    void addMessage(Message message);

    //查询message是否置顶
    Integer findMessageTopState(String publishId);

    //修改message为置顶
    Boolean modifyMessageTop(ObjectId publishId);

    //取消置顶
    Boolean modifyMessageUntop(ObjectId objectId);

    //撤销已拒绝
    Boolean revocationMessage(String id);

    //查询已通过的message(机审和人审)
    List<Message> getPassedMessagesByState(Integer page, Integer pageSize, Long userId, String state, String sortProp, String sortOrder,Long startTime,Long endTime);

     //查询用户动态记录
    List<Message> findUserMovementsRecord(Integer page, Integer pageSize, Long userId);
}
